'use strict';
// Copyright 2014 Blueant Inc. All Rights Reserved.

/**
 * @fileoverview 激活码类型
 * @author sundbcn@gmail.com (sun debing)
 */

var mongoConnector = require('../libs/mongodb/mongoConnector');
/* jshint unused:false */
var cdkTypeSchema = require('../schemas/cdkTypeSchema');
var CdkType = mongoConnector().model('CdkType');
var dataApi = require('../libs/dataApi');

var cdkTypeModel = module.exports;

/**
 * 查询激活码类型
 */
cdkTypeModel.getCdkType = function (cdk_type, cb) {
    CdkType.findOne({
        cdk_type: cdk_type
    }, cb);
};

/**
 * 查询所有激活码类型
 */
cdkTypeModel.findAll = function (cb) {
    CdkType.find({}, cb);
};
